package com.qf.function.pojo;

import java.util.Objects;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/9/2 11:47
 */
public class User {
    private String name;
    private int age;
    private String addresss;

    public User() {
    }

    public User(String name, int age, String addresss) {
        this.name = name;
        this.age = age;
        this.addresss = addresss;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddresss() {
        return addresss;
    }

    public void setAddresss(String addresss) {
        this.addresss = addresss;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", addresss='" + addresss + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return age == user.age && Objects.equals(name, user.name) && Objects.equals(addresss, user.addresss);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, addresss);
    }
}
